package com.ch.clinking.Dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.ch.clinking.bean.User;

import java.util.List;

@Dao
public interface UserDao {

    @Insert
    void insert(User... users);

    @Delete
    void delete(User... users);

    @Update
    int update(User... users);

    @Query("SELECT * FROM User WHERE account = :account")
    User queryByAccount(String account);

    @Query("SELECT * FROM User WHERE shopId = :shopId")
    List<User> queryByShopId(String shopId);

}
